<template>
    <view class="content">
        <view class="titlex">{{data.title}}</view>
        <view class="times">
            {{data.create_time}}<text class="u-p-l-20">{{data.actual_browse_nums}}次浏览</text>
        </view>
        <view class="ctx" v-if="data && data.vice_data && data.vice_data.content">
            <u-parse :html="data.vice_data.content"></u-parse>
        </view>
    </view>
</template>

<script>
    export default {
        data() {
            return {
                data: {},
            };
        },
        onLoad(option) {
        	this.id = option.id;
        	this.getNoticeContent();
        },
        methods: {
            getNoticeContent() {
            	this.$ajax('contentsInfo', {
                    userToken: this.$getSync('userToken'),
            		id: this.id,
            	}).then(ret => {
            		if (ret.status == 0) {
            			this.data = ret.data
            		} else {
            			this.$toast(ret.message);
            		}
            	});
            },
        }
    };
</script>

<style lang="scss">
    page{
        border-top: 2rpx solid #e4e4e4;
    }
    .content {
        padding: 40rpx 25rpx;
    }

    .titlex {
        font-size: 34rpx;
        color: #000000;
        line-height: 50rpx;
        margin-bottom: 12rpx;
        text-align: center;
    }

    .times {
        font-size: 24rpx;
        color: #666666;
        line-height: 32rpx;
        text-align: center;
        padding-bottom: 32rpx;
    }

    .ctx {
        border-top: 2rpx solid #e4e4e4;
        padding-top: 52rpx;
    }
</style>